﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Transactions {
    import Engine.Transactions.*;
    import Display.*;

    public class TUpdatePendingCityName extends Transaction {

        private var m_cityName:String;

        public function TUpdatePendingCityName(_arg1:String){
            this.m_cityName = _arg1;
        }
        override public function perform():void{
            signedCall("UserService.updatePendingCityName", this.m_cityName);
        }
        override protected function onComplete(_arg1:Object):void{
            if (((_arg1.hasOwnProperty("name")) && (((!((_arg1["name"] == null))) && (!((_arg1["name"] == "null"))))))){
                Global.player.cityName = _arg1["name"];
                Global.player.pendingCityName = _arg1["name"];
            } else {
                Global.player.pendingCityName = null;
                UI.displayMessage(ZLoc.t("Dialogs", "InvalidCityName"), 0, null, "", true);
            };
            if (Global.ui.renameDialog){
                Global.ui.renameDialog.updateDataFormServer();
            };
        }

    }
}//package Transactions 
